/**
 * 
 */
package com.amoby.main.service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.amoby.main.entity.AlipayOrder;
import com.amoby.main.entity.Business;
import com.amoby.main.entity.Cbabill;

/**
 * @desc:转账
 * @author Lasing 2016-5-25 下午2:55:42
 * @version V1.0
 */
public interface CbaBillService {

    /**
     * 处理已计划的账单
     * @param paySchedu
     */
    public void handleScheduCbabill(Date paySchedu);

    /**
     * 修改状态
     * @param map
     * @return
     */
    public int updateIsActive(Map<String, Object> map);

    /**
     * 支付宝活动订单 每晚1点5份定时转账开始 廖江红 2015-11-23
     * @param orders
     * @param bus
     * @return
     */
    public Cbabill startAlipayOrderBill(List<AlipayOrder> orders, Business bus) throws Exception;

    /**
     * 支付宝活动订单 每晚0点定时转账开始
     * @author Lasing 2016-2-18 下午5:51:18
     * @param orders
     * @param b
     * @param amount
     * @return
     * @throws Exception 
     */
    public Cbabill startAlipayTransfer(List<AlipayOrder> orders, Business b, Double amount) throws Exception;
   
    /**
     * 支付宝活动订单 每月8号0点定时转账开始
     * @author Lasing 2016-2-18 下午5:51:18
     * @param orders
     * @param b
     * @param amount
     * @return
     * @throws Exception 
     */
    public Cbabill startAlipayOrderAll(List<AlipayOrder> orders, Business b) throws Exception;

    /**
     * 获取转账池限额
     * @author Lasing 2016-2-19 上午9:38:52
     * @return
     */
    public BigDecimal transferPoolLmt();
    
    /**
     * 转账流程流转
     * @param billId 账单对象ID
     * @param billOperation 操作
     * @return
     * @throws Exception
     */
    public Cbabill flowBill(Long billId, BillOperation billOperation) throws Exception;

    /**
     * 支付宝活动订单 每晚0点定时批量转账开始
     * @param list
     * @return
     * @throws Exception 
     */
	public List<Cbabill> startAlipayTransferBatch(List<Business> list) throws Exception;

	/**
     * 支付宝活动订单 批量转账
     * @author Lasing 2016-2-18 下午5:51:18
     * @param orders
     * @param b
     * @param amount
     * @return
     * @throws Exception 
     */
	public List<Cbabill> flowBill(List<Cbabill> billList, BillOperation billOperation) throws Exception;
}
